﻿using GalaSoft.MvvmLight.Messaging;
using NicoView.Model.Service.Events;
using NicoView.ViewModel.Localize;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace NicoView.ViewModel.Message
{
    public sealed class NicoViewSentCommentResultMessage:NotificationMessage
    {


        public SentResult Result { get; private set; }

        private static string convertToString(SentResult result)
        {
            switch (result)
            {
                case SentResult.Succeed:
                    return Langage.Current.CommentSentSucceedMessage;

                case SentResult.UnKnownError:
                    return Langage.Current.CommentSentFailMessage;




                case SentResult.ThicketError:
                case SentResult.ThreadError:
                    return Langage.Current.CommentSentIncorrectConnectionMessage;

                case SentResult.PostKeyError:
                    return Langage.Current.CommentSentPostKeyErrorMessage;

                case SentResult.UnDefined:
                    return Langage.Current.CommentSentUndefinedCodeMessage;

                default:
                    return "";
            }
        }

        public NicoViewSentCommentResultMessage(SentResult result):base(convertToString(result))
        {

            this.Result = result;
            
        }
    }
}
